#ifndef CHASSIS_H
#define CHASSIS_H

#include "controller.h"

/**
 * @brief 底盘应用初始化,请在开启rtos之前调用(目前会被RobotInit()调用)
 * 
 */
void ChassisInit();

/**
 * @brief 底盘应用任务,放入实时系统以一定频率运行
 * 
 */
void ChassisTask();

#pragma pack(1)
typedef struct 
{
    float x, y, rad, displacement, displacement_2;
    float last_x, last_y, last_displacement;
    float error_x, error_y;
    float c_xy[2], a_xy[2];  // 横轴为x(xy[0]), 纵轴为y(xy[1])

    PIDInstance pid_vx, pid_vy, pid_wz;
} Chassis_Offset;
#pragma pack()

#endif // CHASSIS_H